<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
    <style>
        .box1{
            width: 100px;
            height: 100px;
            background-color: red;
        }
        .box2{
            width: 100px;
            height: 100px;
            background-color:yellow;
        }
        .box3{
            width: 100px;
            height: 100px;
            background-color:green;
        }
    </style>
</head>
<body>
    <div id="root">
    <div class = 'box1' v-if="color == 'red' "></div>
    <div class = 'box2' v-else-if="color==='yellow' "></div>
    <div class = 'box3' v-else></div>
</div>
</body>
</html>
<script>
    const vm = new Vue({
        el:'#root',
        data:{
           color:'red' 
        }
    })
</script>